package net.lovesrc.allin.jobs.backup;

import net.lovesrc.allin.biz.ercx.ErcxRegisterService;
import net.lovesrc.allin.jobs.base.BaseJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import java.util.concurrent.atomic.AtomicBoolean;

@Component
@Profile("2021")
public class ErcxRegisterJob extends BaseJob {

    public AtomicBoolean flag = new AtomicBoolean(true);

    @Autowired
    ErcxRegisterService ercxRegisterService;

    @Override
    public void runOnce() throws Exception {
        ercxRegisterService.sign();
    }

    @Override
    public boolean runFlag() {
        return flag.get();
    }
}
